#!/bin/bash
#
# This is in /usr/local/bin/sendmotion.sh
#
# Run this as often as you want, but the frequency should be correlated to
# the length of the videos you have motion generate and how long you are
# willing to risk not having remote copies of your motion data in case of
# a break in.
#
# My crontab entry as root runs this every minute:
# * * * * *  /usr/local/bin/sendmotion.sh 2>&1 >/dev/null
#
# You need to setup passwordless ssh from root on this machine to
# username@server
server='reachable_server_to_send_files_to'
username='your_user_name_on_server'
#
/usr/bin/rsync -r /tmp/motion ${username}@${server}:
rm -fR /tmp/motion/*
